var fs = require('fs')
var files = fs.readdirSync('./router')
let entitys = require('../entity/index.js')

module.exports = function(app,loginRouter,db){
  for(var i = 0; i < files.length; i ++) {
    if(files[i] != 'index.js' && /\.js$/.test(files[i])) require('./' + files[i]).call(null,app,entitys,loginRouter,db)
  }
}